﻿using System;
using System.Collections.Generic;
using System.Text;

namespace RAP.Framework.Libary.Payment.WxPay
{
  /// <summary>
  /// 支付返回错误码描述
  /// </summary>
  public sealed class PayResultCodes : Dictionary<string, string>
  {
    public PayResultCodes Instance { get; } = new PayResultCodes();

    private PayResultCodes()
    {
      this["INVALID_REQUEST"] = "参数错误";
      this["NOAUTH"] = "商户无此接口权限";
      this["NOTENOUGH"] = "余额不足";
      this["ORDERPAID"] = "商户订单已支付";
      this["ORDERCLOSED"] = "订单已关闭";
      this["SYSTEMERROR"] = "系统错误";
      this["APPID_NOT_EXIST"] = "APPID不存在";
      this["MCHID_NOT_EXIST"] = "MCHID不存在";
      this["APPID_MCHID_NOT_MATCH"] = "appid和mch_id不匹配";
      this["LACK_PARAMS"] = "缺少参数";
      this["OUT_TRADE_NO_USED"] = "商户订单号重复";
      this["SIGNERROR"] = "签名错误";
      this["XML_FORMAT_ERROR"] = "XML格式错误";
      this["REQUIRE_POST_METHOD"] = "请使用post方法";
      this["POST_DATA_EMPTY"] = "post数据为空";
      this["NOT_UTF8"] = "编码格式错误";
    }
  }
}
